# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:       王景渊  
# Name:         lx
# Description:
# Author:       dell
# Date:         2019/4/13
#-------------------------------------------------------------------------------

import random

def shengcheng():
    model = [1,2,3,4,5,6,7,8,9,10,11,12,13]
    list1= model
    list2 = [14,15]      #14代表小王，15代表大王
    total_list = list1 + list1 + list1 + list1 + list2
    return total_list



def xipai(list):
    random.shuffle(list)
    return list


def fapai(list):
    a = []
    b = []
    c = []
    d = []
    t1 = t2 =t3 = 0

    for i in list:
        if (i <=2 or i>10) and t1<=16:
            a.append(i)
            t1= t1+1
        elif t2<=16:
            b.append(i)
            t2 = t2+1
        elif t3<=16:
            c.append(i)
            t3 = t3+1
        else:
            d.append(i)
    print('Role1的牌为:',a)
    print('Role2的牌为:',b)
    print('Role3的牌为:',c)
    print('底牌为:',d)

total = shengcheng()
re_total = xipai(total)
fapai(re_total)

